﻿using System;
using System.Data;
using System.Text;
using System.Data.OracleClient;
using DBUtility;//Please add references
namespace TierApplication
{
	/// <summary>
	/// 类T_ALIPAYREQUEST。
	/// </summary>
	[Serializable]
	public partial class T_ALIPAYREQUEST
	{
		public T_ALIPAYREQUEST()
		{}
		#region Model
		private string _alipayrequestid;
		private string _service;
		private string _partner;
		private string _input_charset;
		private string _sign_type;
		private string _sign;
		private string _notify_url;
		private string _return_url;
		private string _error_notify_url;
		private string _out_trade_no;
		private string _subject;
		private string _payment_type;
		private string _seller_email;
		private string _buyer_email;
		private string _seller_id;
		private string _buyer_id;
		private string _seller_account_name;
		private string _buyer_account_name;
		private decimal? _price;
		private decimal? _total_fee;
		private decimal? _quantify;
		private string _body;
		private string _show_url;
		private string _paymethod;
		private string _it_b_pay;
		private string _defaultbank;
		private string _need_ctu_check;
		private string _royalty_type;
		private string _royalty_parameters;
		private string _anti_phishing_key;
		private string _exter_invoke_ip;
		private string _extra_common_param;
		/// <summary>
		/// 系统流水号
		/// </summary>
		public string ALIPAYREQUESTID
		{
			set{ _alipayrequestid=value;}
			get{return _alipayrequestid;}
		}
		/// <summary>
		/// 接口名称
		/// </summary>
		public string SERVICE
		{
			set{ _service=value;}
			get{return _service;}
		}
		/// <summary>
		/// 合作身份者ID
		/// </summary>
		public string PARTNER
		{
			set{ _partner=value;}
			get{return _partner;}
		}
		/// <summary>
		/// 参数编码字符集
		/// </summary>
		public string INPUT_CHARSET
		{
			set{ _input_charset=value;}
			get{return _input_charset;}
		}
		/// <summary>
		/// 签名方式
		/// </summary>
		public string SIGN_TYPE
		{
			set{ _sign_type=value;}
			get{return _sign_type;}
		}
		/// <summary>
		/// 签名
		/// </summary>
		public string SIGN
		{
			set{ _sign=value;}
			get{return _sign;}
		}
		/// <summary>
		/// 服务器异步通知页面路径
		/// </summary>
		public string NOTIFY_URL
		{
			set{ _notify_url=value;}
			get{return _notify_url;}
		}
		/// <summary>
		/// 页面跳转同步通知页面路径
		/// </summary>
		public string RETURN_URL
		{
			set{ _return_url=value;}
			get{return _return_url;}
		}
		/// <summary>
		/// 错误信息返回URL
		/// </summary>
		public string ERROR_NOTIFY_URL
		{
			set{ _error_notify_url=value;}
			get{return _error_notify_url;}
		}
		/// <summary>
		/// 商户网站唯一订单号
		/// </summary>
		public string OUT_TRADE_NO
		{
			set{ _out_trade_no=value;}
			get{return _out_trade_no;}
		}
		/// <summary>
		/// 商品名称
		/// </summary>
		public string SUBJECT
		{
			set{ _subject=value;}
			get{return _subject;}
		}
		/// <summary>
		/// 支付类型
		/// </summary>
		public string PAYMENT_TYPE
		{
			set{ _payment_type=value;}
			get{return _payment_type;}
		}
		/// <summary>
		/// 卖家支付宝账号
		/// </summary>
		public string SELLER_EMAIL
		{
			set{ _seller_email=value;}
			get{return _seller_email;}
		}
		/// <summary>
		/// 买家支付宝账号
		/// </summary>
		public string BUYER_EMAIL
		{
			set{ _buyer_email=value;}
			get{return _buyer_email;}
		}
		/// <summary>
		/// 卖家支付宝账户号
		/// </summary>
		public string SELLER_ID
		{
			set{ _seller_id=value;}
			get{return _seller_id;}
		}
		/// <summary>
		/// 买家支付宝账户号
		/// </summary>
		public string BUYER_ID
		{
			set{ _buyer_id=value;}
			get{return _buyer_id;}
		}
		/// <summary>
		/// 卖家别名支付宝账号
		/// </summary>
		public string SELLER_ACCOUNT_NAME
		{
			set{ _seller_account_name=value;}
			get{return _seller_account_name;}
		}
		/// <summary>
		/// 买家别名支付宝账号
		/// </summary>
		public string BUYER_ACCOUNT_NAME
		{
			set{ _buyer_account_name=value;}
			get{return _buyer_account_name;}
		}
		/// <summary>
		/// 商品单价
		/// </summary>
		public decimal? PRICE
		{
			set{ _price=value;}
			get{return _price;}
		}
		/// <summary>
		/// 交易金额
		/// </summary>
		public decimal? TOTAL_FEE
		{
			set{ _total_fee=value;}
			get{return _total_fee;}
		}
		/// <summary>
		/// 购买数量
		/// </summary>
		public decimal? QUANTIFY
		{
			set{ _quantify=value;}
			get{return _quantify;}
		}
		/// <summary>
		/// 商品描述
		/// </summary>
		public string BODY
		{
			set{ _body=value;}
			get{return _body;}
		}
		/// <summary>
		/// 商品展示网址
		/// </summary>
		public string SHOW_URL
		{
			set{ _show_url=value;}
			get{return _show_url;}
		}
		/// <summary>
		/// 默认支付方式
		/// </summary>
		public string PAYMETHOD
		{
			set{ _paymethod=value;}
			get{return _paymethod;}
		}
		/// <summary>
		/// 超时时间
		/// </summary>
		public string IT_B_PAY
		{
			set{ _it_b_pay=value;}
			get{return _it_b_pay;}
		}
		/// <summary>
		/// 默认网银
		/// </summary>
		public string DEFAULTBANK
		{
			set{ _defaultbank=value;}
			get{return _defaultbank;}
		}
		/// <summary>
		/// 网银支付时是否做CTU校验
		/// </summary>
		public string NEED_CTU_CHECK
		{
			set{ _need_ctu_check=value;}
			get{return _need_ctu_check;}
		}
		/// <summary>
		/// 提成类型
		/// </summary>
		public string ROYALTY_TYPE
		{
			set{ _royalty_type=value;}
			get{return _royalty_type;}
		}
		/// <summary>
		/// 提成信息集
		/// </summary>
		public string ROYALTY_PARAMETERS
		{
			set{ _royalty_parameters=value;}
			get{return _royalty_parameters;}
		}
		/// <summary>
		/// 防钓鱼时间戳
		/// </summary>
		public string ANTI_PHISHING_KEY
		{
			set{ _anti_phishing_key=value;}
			get{return _anti_phishing_key;}
		}
		/// <summary>
		/// 客户端IP
		/// </summary>
		public string EXTER_INVOKE_IP
		{
			set{ _exter_invoke_ip=value;}
			get{return _exter_invoke_ip;}
		}
		/// <summary>
		/// 公用回传参数
		/// </summary>
		public string EXTRA_COMMON_PARAM
		{
			set{ _extra_common_param=value;}
			get{return _extra_common_param;}
		}
		#endregion Model


		#region  Method

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public T_ALIPAYREQUEST(string ALIPAYREQUESTID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select ALIPAYREQUESTID,SERVICE,PARTNER,INPUT_CHARSET,SIGN_TYPE,SIGN,NOTIFY_URL,RETURN_URL,ERROR_NOTIFY_URL,OUT_TRADE_NO,SUBJECT,PAYMENT_TYPE,SELLER_EMAIL,BUYER_EMAIL,SELLER_ID,BUYER_ID,SELLER_ACCOUNT_NAME,BUYER_ACCOUNT_NAME,PRICE,TOTAL_FEE,QUANTIFY,BODY,SHOW_URL,PAYMETHOD,IT_B_PAY,DEFAULTBANK,NEED_CTU_CHECK,ROYALTY_TYPE,ROYALTY_PARAMETERS,ANTI_PHISHING_KEY,EXTER_INVOKE_IP,EXTRA_COMMON_PARAM ");
			strSql.Append(" FROM T_ALIPAYREQUEST ");
			strSql.Append(" where ALIPAYREQUESTID=:ALIPAYREQUESTID ");
			OracleParameter[] parameters = {
					new OracleParameter(":ALIPAYREQUESTID", OracleType.VarChar,50)};
			parameters[0].Value = ALIPAYREQUESTID;

			DataSet ds=DbHelperOra.Query(strSql.ToString(),parameters);
			if(ds.Tables[0].Rows.Count>0)
			{
				if(ds.Tables[0].Rows[0]["ALIPAYREQUESTID"]!=null && ds.Tables[0].Rows[0]["ALIPAYREQUESTID"].ToString()!="")
				{
					this.ALIPAYREQUESTID=ds.Tables[0].Rows[0]["ALIPAYREQUESTID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SERVICE"]!=null && ds.Tables[0].Rows[0]["SERVICE"].ToString()!="")
				{
					this.SERVICE=ds.Tables[0].Rows[0]["SERVICE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PARTNER"]!=null && ds.Tables[0].Rows[0]["PARTNER"].ToString()!="")
				{
					this.PARTNER=ds.Tables[0].Rows[0]["PARTNER"].ToString();
				}
				if(ds.Tables[0].Rows[0]["INPUT_CHARSET"]!=null && ds.Tables[0].Rows[0]["INPUT_CHARSET"].ToString()!="")
				{
					this.INPUT_CHARSET=ds.Tables[0].Rows[0]["INPUT_CHARSET"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SIGN_TYPE"]!=null && ds.Tables[0].Rows[0]["SIGN_TYPE"].ToString()!="")
				{
					this.SIGN_TYPE=ds.Tables[0].Rows[0]["SIGN_TYPE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SIGN"]!=null && ds.Tables[0].Rows[0]["SIGN"].ToString()!="")
				{
					this.SIGN=ds.Tables[0].Rows[0]["SIGN"].ToString();
				}
				if(ds.Tables[0].Rows[0]["NOTIFY_URL"]!=null && ds.Tables[0].Rows[0]["NOTIFY_URL"].ToString()!="")
				{
					this.NOTIFY_URL=ds.Tables[0].Rows[0]["NOTIFY_URL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["RETURN_URL"]!=null && ds.Tables[0].Rows[0]["RETURN_URL"].ToString()!="")
				{
					this.RETURN_URL=ds.Tables[0].Rows[0]["RETURN_URL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["ERROR_NOTIFY_URL"]!=null && ds.Tables[0].Rows[0]["ERROR_NOTIFY_URL"].ToString()!="")
				{
					this.ERROR_NOTIFY_URL=ds.Tables[0].Rows[0]["ERROR_NOTIFY_URL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["OUT_TRADE_NO"]!=null && ds.Tables[0].Rows[0]["OUT_TRADE_NO"].ToString()!="")
				{
					this.OUT_TRADE_NO=ds.Tables[0].Rows[0]["OUT_TRADE_NO"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SUBJECT"]!=null && ds.Tables[0].Rows[0]["SUBJECT"].ToString()!="")
				{
					this.SUBJECT=ds.Tables[0].Rows[0]["SUBJECT"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PAYMENT_TYPE"]!=null && ds.Tables[0].Rows[0]["PAYMENT_TYPE"].ToString()!="")
				{
					this.PAYMENT_TYPE=ds.Tables[0].Rows[0]["PAYMENT_TYPE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SELLER_EMAIL"]!=null && ds.Tables[0].Rows[0]["SELLER_EMAIL"].ToString()!="")
				{
					this.SELLER_EMAIL=ds.Tables[0].Rows[0]["SELLER_EMAIL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["BUYER_EMAIL"]!=null && ds.Tables[0].Rows[0]["BUYER_EMAIL"].ToString()!="")
				{
					this.BUYER_EMAIL=ds.Tables[0].Rows[0]["BUYER_EMAIL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SELLER_ID"]!=null && ds.Tables[0].Rows[0]["SELLER_ID"].ToString()!="")
				{
					this.SELLER_ID=ds.Tables[0].Rows[0]["SELLER_ID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["BUYER_ID"]!=null && ds.Tables[0].Rows[0]["BUYER_ID"].ToString()!="")
				{
					this.BUYER_ID=ds.Tables[0].Rows[0]["BUYER_ID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SELLER_ACCOUNT_NAME"]!=null && ds.Tables[0].Rows[0]["SELLER_ACCOUNT_NAME"].ToString()!="")
				{
					this.SELLER_ACCOUNT_NAME=ds.Tables[0].Rows[0]["SELLER_ACCOUNT_NAME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["BUYER_ACCOUNT_NAME"]!=null && ds.Tables[0].Rows[0]["BUYER_ACCOUNT_NAME"].ToString()!="")
				{
					this.BUYER_ACCOUNT_NAME=ds.Tables[0].Rows[0]["BUYER_ACCOUNT_NAME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PRICE"]!=null && ds.Tables[0].Rows[0]["PRICE"].ToString()!="")
				{
					this.PRICE=decimal.Parse(ds.Tables[0].Rows[0]["PRICE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["TOTAL_FEE"]!=null && ds.Tables[0].Rows[0]["TOTAL_FEE"].ToString()!="")
				{
					this.TOTAL_FEE=decimal.Parse(ds.Tables[0].Rows[0]["TOTAL_FEE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["QUANTIFY"]!=null && ds.Tables[0].Rows[0]["QUANTIFY"].ToString()!="")
				{
					this.QUANTIFY=decimal.Parse(ds.Tables[0].Rows[0]["QUANTIFY"].ToString());
				}
				if(ds.Tables[0].Rows[0]["BODY"]!=null && ds.Tables[0].Rows[0]["BODY"].ToString()!="")
				{
					this.BODY=ds.Tables[0].Rows[0]["BODY"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SHOW_URL"]!=null && ds.Tables[0].Rows[0]["SHOW_URL"].ToString()!="")
				{
					this.SHOW_URL=ds.Tables[0].Rows[0]["SHOW_URL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PAYMETHOD"]!=null && ds.Tables[0].Rows[0]["PAYMETHOD"].ToString()!="")
				{
					this.PAYMETHOD=ds.Tables[0].Rows[0]["PAYMETHOD"].ToString();
				}
				if(ds.Tables[0].Rows[0]["IT_B_PAY"]!=null && ds.Tables[0].Rows[0]["IT_B_PAY"].ToString()!="")
				{
					this.IT_B_PAY=ds.Tables[0].Rows[0]["IT_B_PAY"].ToString();
				}
				if(ds.Tables[0].Rows[0]["DEFAULTBANK"]!=null && ds.Tables[0].Rows[0]["DEFAULTBANK"].ToString()!="")
				{
					this.DEFAULTBANK=ds.Tables[0].Rows[0]["DEFAULTBANK"].ToString();
				}
				if(ds.Tables[0].Rows[0]["NEED_CTU_CHECK"]!=null && ds.Tables[0].Rows[0]["NEED_CTU_CHECK"].ToString()!="")
				{
					this.NEED_CTU_CHECK=ds.Tables[0].Rows[0]["NEED_CTU_CHECK"].ToString();
				}
				if(ds.Tables[0].Rows[0]["ROYALTY_TYPE"]!=null && ds.Tables[0].Rows[0]["ROYALTY_TYPE"].ToString()!="")
				{
					this.ROYALTY_TYPE=ds.Tables[0].Rows[0]["ROYALTY_TYPE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["ROYALTY_PARAMETERS"]!=null && ds.Tables[0].Rows[0]["ROYALTY_PARAMETERS"].ToString()!="")
				{
					this.ROYALTY_PARAMETERS=ds.Tables[0].Rows[0]["ROYALTY_PARAMETERS"].ToString();
				}
				if(ds.Tables[0].Rows[0]["ANTI_PHISHING_KEY"]!=null && ds.Tables[0].Rows[0]["ANTI_PHISHING_KEY"].ToString()!="")
				{
					this.ANTI_PHISHING_KEY=ds.Tables[0].Rows[0]["ANTI_PHISHING_KEY"].ToString();
				}
				if(ds.Tables[0].Rows[0]["EXTER_INVOKE_IP"]!=null && ds.Tables[0].Rows[0]["EXTER_INVOKE_IP"].ToString()!="")
				{
					this.EXTER_INVOKE_IP=ds.Tables[0].Rows[0]["EXTER_INVOKE_IP"].ToString();
				}
				if(ds.Tables[0].Rows[0]["EXTRA_COMMON_PARAM"]!=null && ds.Tables[0].Rows[0]["EXTRA_COMMON_PARAM"].ToString()!="")
				{
					this.EXTRA_COMMON_PARAM=ds.Tables[0].Rows[0]["EXTRA_COMMON_PARAM"].ToString();
				}
			}
		}

		/// <summary>
		/// 是否存在该记录
		/// </summary>
		public bool Exists(string ALIPAYREQUESTID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select count(1) from T_ALIPAYREQUEST");
			strSql.Append(" where ALIPAYREQUESTID=:ALIPAYREQUESTID ");

			OracleParameter[] parameters = {
					new OracleParameter(":ALIPAYREQUESTID", OracleType.VarChar,50)};
			parameters[0].Value = ALIPAYREQUESTID;

			return DbHelperOra.Exists(strSql.ToString(),parameters);
		}


		/// <summary>
		/// 增加一条数据
		/// </summary>
		public void Add()
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("insert into T_ALIPAYREQUEST (");
			strSql.Append("ALIPAYREQUESTID,SERVICE,PARTNER,INPUT_CHARSET,SIGN_TYPE,SIGN,NOTIFY_URL,RETURN_URL,ERROR_NOTIFY_URL,OUT_TRADE_NO,SUBJECT,PAYMENT_TYPE,SELLER_EMAIL,BUYER_EMAIL,SELLER_ID,BUYER_ID,SELLER_ACCOUNT_NAME,BUYER_ACCOUNT_NAME,PRICE,TOTAL_FEE,QUANTIFY,BODY,SHOW_URL,PAYMETHOD,IT_B_PAY,DEFAULTBANK,NEED_CTU_CHECK,ROYALTY_TYPE,ROYALTY_PARAMETERS,ANTI_PHISHING_KEY,EXTER_INVOKE_IP,EXTRA_COMMON_PARAM)");
			strSql.Append(" values (");
			strSql.Append(":ALIPAYREQUESTID,:SERVICE,:PARTNER,:INPUT_CHARSET,:SIGN_TYPE,:SIGN,:NOTIFY_URL,:RETURN_URL,:ERROR_NOTIFY_URL,:OUT_TRADE_NO,:SUBJECT,:PAYMENT_TYPE,:SELLER_EMAIL,:BUYER_EMAIL,:SELLER_ID,:BUYER_ID,:SELLER_ACCOUNT_NAME,:BUYER_ACCOUNT_NAME,:PRICE,:TOTAL_FEE,:QUANTIFY,:BODY,:SHOW_URL,:PAYMETHOD,:IT_B_PAY,:DEFAULTBANK,:NEED_CTU_CHECK,:ROYALTY_TYPE,:ROYALTY_PARAMETERS,:ANTI_PHISHING_KEY,:EXTER_INVOKE_IP,:EXTRA_COMMON_PARAM)");
			OracleParameter[] parameters = {
					new OracleParameter(":ALIPAYREQUESTID", OracleType.VarChar,10),
					new OracleParameter(":SERVICE", OracleType.VarChar,100),
					new OracleParameter(":PARTNER", OracleType.VarChar,16),
					new OracleParameter(":INPUT_CHARSET", OracleType.VarChar,100),
					new OracleParameter(":SIGN_TYPE", OracleType.VarChar,100),
					new OracleParameter(":SIGN", OracleType.VarChar,100),
					new OracleParameter(":NOTIFY_URL", OracleType.VarChar,190),
					new OracleParameter(":RETURN_URL", OracleType.VarChar,100),
					new OracleParameter(":ERROR_NOTIFY_URL", OracleType.VarChar,190),
					new OracleParameter(":OUT_TRADE_NO", OracleType.VarChar,64),
					new OracleParameter(":SUBJECT", OracleType.VarChar,256),
					new OracleParameter(":PAYMENT_TYPE", OracleType.VarChar,4),
					new OracleParameter(":SELLER_EMAIL", OracleType.VarChar,100),
					new OracleParameter(":BUYER_EMAIL", OracleType.VarChar,100),
					new OracleParameter(":SELLER_ID", OracleType.VarChar,16),
					new OracleParameter(":BUYER_ID", OracleType.VarChar,30),
					new OracleParameter(":SELLER_ACCOUNT_NAME", OracleType.VarChar,100),
					new OracleParameter(":BUYER_ACCOUNT_NAME", OracleType.VarChar,100),
					new OracleParameter(":PRICE", OracleType.Number,12),
					new OracleParameter(":TOTAL_FEE", OracleType.Number,12),
					new OracleParameter(":QUANTIFY", OracleType.Number,12),
					new OracleParameter(":BODY", OracleType.VarChar,1000),
					new OracleParameter(":SHOW_URL", OracleType.VarChar,400),
					new OracleParameter(":PAYMETHOD", OracleType.VarChar,100),
					new OracleParameter(":IT_B_PAY", OracleType.VarChar,3),
					new OracleParameter(":DEFAULTBANK", OracleType.VarChar,100),
					new OracleParameter(":NEED_CTU_CHECK", OracleType.VarChar,100),
					new OracleParameter(":ROYALTY_TYPE", OracleType.VarChar,2),
					new OracleParameter(":ROYALTY_PARAMETERS", OracleType.VarChar,500),
					new OracleParameter(":ANTI_PHISHING_KEY", OracleType.VarChar,100),
					new OracleParameter(":EXTER_INVOKE_IP", OracleType.VarChar,15),
					new OracleParameter(":EXTRA_COMMON_PARAM", OracleType.VarChar,200)};
			parameters[0].Value = ALIPAYREQUESTID;
			parameters[1].Value = SERVICE;
			parameters[2].Value = PARTNER;
			parameters[3].Value = INPUT_CHARSET;
			parameters[4].Value = SIGN_TYPE;
			parameters[5].Value = SIGN;
			parameters[6].Value = NOTIFY_URL;
			parameters[7].Value = RETURN_URL;
			parameters[8].Value = ERROR_NOTIFY_URL;
			parameters[9].Value = OUT_TRADE_NO;
			parameters[10].Value = SUBJECT;
			parameters[11].Value = PAYMENT_TYPE;
			parameters[12].Value = SELLER_EMAIL;
			parameters[13].Value = BUYER_EMAIL;
			parameters[14].Value = SELLER_ID;
			parameters[15].Value = BUYER_ID;
			parameters[16].Value = SELLER_ACCOUNT_NAME;
			parameters[17].Value = BUYER_ACCOUNT_NAME;
			parameters[18].Value = PRICE;
			parameters[19].Value = TOTAL_FEE;
			parameters[20].Value = QUANTIFY;
			parameters[21].Value = BODY;
			parameters[22].Value = SHOW_URL;
			parameters[23].Value = PAYMETHOD;
			parameters[24].Value = IT_B_PAY;
			parameters[25].Value = DEFAULTBANK;
			parameters[26].Value = NEED_CTU_CHECK;
			parameters[27].Value = ROYALTY_TYPE;
			parameters[28].Value = ROYALTY_PARAMETERS;
			parameters[29].Value = ANTI_PHISHING_KEY;
			parameters[30].Value = EXTER_INVOKE_IP;
			parameters[31].Value = EXTRA_COMMON_PARAM;

			DbHelperOra.ExecuteSql(strSql.ToString(),parameters);
		}
		/// <summary>
		/// 更新一条数据
		/// </summary>
		public bool Update()
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("update T_ALIPAYREQUEST set ");
			strSql.Append("SERVICE=:SERVICE,");
			strSql.Append("PARTNER=:PARTNER,");
			strSql.Append("INPUT_CHARSET=:INPUT_CHARSET,");
			strSql.Append("SIGN_TYPE=:SIGN_TYPE,");
			strSql.Append("SIGN=:SIGN,");
			strSql.Append("NOTIFY_URL=:NOTIFY_URL,");
			strSql.Append("RETURN_URL=:RETURN_URL,");
			strSql.Append("ERROR_NOTIFY_URL=:ERROR_NOTIFY_URL,");
			strSql.Append("OUT_TRADE_NO=:OUT_TRADE_NO,");
			strSql.Append("SUBJECT=:SUBJECT,");
			strSql.Append("PAYMENT_TYPE=:PAYMENT_TYPE,");
			strSql.Append("SELLER_EMAIL=:SELLER_EMAIL,");
			strSql.Append("BUYER_EMAIL=:BUYER_EMAIL,");
			strSql.Append("SELLER_ID=:SELLER_ID,");
			strSql.Append("BUYER_ID=:BUYER_ID,");
			strSql.Append("SELLER_ACCOUNT_NAME=:SELLER_ACCOUNT_NAME,");
			strSql.Append("BUYER_ACCOUNT_NAME=:BUYER_ACCOUNT_NAME,");
			strSql.Append("PRICE=:PRICE,");
			strSql.Append("TOTAL_FEE=:TOTAL_FEE,");
			strSql.Append("QUANTIFY=:QUANTIFY,");
			strSql.Append("BODY=:BODY,");
			strSql.Append("SHOW_URL=:SHOW_URL,");
			strSql.Append("PAYMETHOD=:PAYMETHOD,");
			strSql.Append("IT_B_PAY=:IT_B_PAY,");
			strSql.Append("DEFAULTBANK=:DEFAULTBANK,");
			strSql.Append("NEED_CTU_CHECK=:NEED_CTU_CHECK,");
			strSql.Append("ROYALTY_TYPE=:ROYALTY_TYPE,");
			strSql.Append("ROYALTY_PARAMETERS=:ROYALTY_PARAMETERS,");
			strSql.Append("ANTI_PHISHING_KEY=:ANTI_PHISHING_KEY,");
			strSql.Append("EXTER_INVOKE_IP=:EXTER_INVOKE_IP,");
			strSql.Append("EXTRA_COMMON_PARAM=:EXTRA_COMMON_PARAM");
			strSql.Append(" where ALIPAYREQUESTID=:ALIPAYREQUESTID ");
			OracleParameter[] parameters = {
					new OracleParameter(":SERVICE", OracleType.VarChar,100),
					new OracleParameter(":PARTNER", OracleType.VarChar,16),
					new OracleParameter(":INPUT_CHARSET", OracleType.VarChar,100),
					new OracleParameter(":SIGN_TYPE", OracleType.VarChar,100),
					new OracleParameter(":SIGN", OracleType.VarChar,100),
					new OracleParameter(":NOTIFY_URL", OracleType.VarChar,190),
					new OracleParameter(":RETURN_URL", OracleType.VarChar,100),
					new OracleParameter(":ERROR_NOTIFY_URL", OracleType.VarChar,190),
					new OracleParameter(":OUT_TRADE_NO", OracleType.VarChar,64),
					new OracleParameter(":SUBJECT", OracleType.VarChar,256),
					new OracleParameter(":PAYMENT_TYPE", OracleType.VarChar,4),
					new OracleParameter(":SELLER_EMAIL", OracleType.VarChar,100),
					new OracleParameter(":BUYER_EMAIL", OracleType.VarChar,100),
					new OracleParameter(":SELLER_ID", OracleType.VarChar,16),
					new OracleParameter(":BUYER_ID", OracleType.VarChar,30),
					new OracleParameter(":SELLER_ACCOUNT_NAME", OracleType.VarChar,100),
					new OracleParameter(":BUYER_ACCOUNT_NAME", OracleType.VarChar,100),
					new OracleParameter(":PRICE", OracleType.Number,12),
					new OracleParameter(":TOTAL_FEE", OracleType.Number,12),
					new OracleParameter(":QUANTIFY", OracleType.Number,12),
					new OracleParameter(":BODY", OracleType.VarChar,1000),
					new OracleParameter(":SHOW_URL", OracleType.VarChar,400),
					new OracleParameter(":PAYMETHOD", OracleType.VarChar,100),
					new OracleParameter(":IT_B_PAY", OracleType.VarChar,3),
					new OracleParameter(":DEFAULTBANK", OracleType.VarChar,100),
					new OracleParameter(":NEED_CTU_CHECK", OracleType.VarChar,100),
					new OracleParameter(":ROYALTY_TYPE", OracleType.VarChar,2),
					new OracleParameter(":ROYALTY_PARAMETERS", OracleType.VarChar,500),
					new OracleParameter(":ANTI_PHISHING_KEY", OracleType.VarChar,100),
					new OracleParameter(":EXTER_INVOKE_IP", OracleType.VarChar,15),
					new OracleParameter(":EXTRA_COMMON_PARAM", OracleType.VarChar,200),
					new OracleParameter(":ALIPAYREQUESTID", OracleType.VarChar,10)};
			parameters[0].Value = SERVICE;
			parameters[1].Value = PARTNER;
			parameters[2].Value = INPUT_CHARSET;
			parameters[3].Value = SIGN_TYPE;
			parameters[4].Value = SIGN;
			parameters[5].Value = NOTIFY_URL;
			parameters[6].Value = RETURN_URL;
			parameters[7].Value = ERROR_NOTIFY_URL;
			parameters[8].Value = OUT_TRADE_NO;
			parameters[9].Value = SUBJECT;
			parameters[10].Value = PAYMENT_TYPE;
			parameters[11].Value = SELLER_EMAIL;
			parameters[12].Value = BUYER_EMAIL;
			parameters[13].Value = SELLER_ID;
			parameters[14].Value = BUYER_ID;
			parameters[15].Value = SELLER_ACCOUNT_NAME;
			parameters[16].Value = BUYER_ACCOUNT_NAME;
			parameters[17].Value = PRICE;
			parameters[18].Value = TOTAL_FEE;
			parameters[19].Value = QUANTIFY;
			parameters[20].Value = BODY;
			parameters[21].Value = SHOW_URL;
			parameters[22].Value = PAYMETHOD;
			parameters[23].Value = IT_B_PAY;
			parameters[24].Value = DEFAULTBANK;
			parameters[25].Value = NEED_CTU_CHECK;
			parameters[26].Value = ROYALTY_TYPE;
			parameters[27].Value = ROYALTY_PARAMETERS;
			parameters[28].Value = ANTI_PHISHING_KEY;
			parameters[29].Value = EXTER_INVOKE_IP;
			parameters[30].Value = EXTRA_COMMON_PARAM;
			parameters[31].Value = ALIPAYREQUESTID;

			int rows=DbHelperOra.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}

		/// <summary>
		/// 删除一条数据
		/// </summary>
		public bool Delete(string ALIPAYREQUESTID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("delete from T_ALIPAYREQUEST ");
			strSql.Append(" where ALIPAYREQUESTID=:ALIPAYREQUESTID ");
			OracleParameter[] parameters = {
					new OracleParameter(":ALIPAYREQUESTID", OracleType.VarChar,50)};
			parameters[0].Value = ALIPAYREQUESTID;

			int rows=DbHelperOra.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}


		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public void GetModel(string ALIPAYREQUESTID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select ALIPAYREQUESTID,SERVICE,PARTNER,INPUT_CHARSET,SIGN_TYPE,SIGN,NOTIFY_URL,RETURN_URL,ERROR_NOTIFY_URL,OUT_TRADE_NO,SUBJECT,PAYMENT_TYPE,SELLER_EMAIL,BUYER_EMAIL,SELLER_ID,BUYER_ID,SELLER_ACCOUNT_NAME,BUYER_ACCOUNT_NAME,PRICE,TOTAL_FEE,QUANTIFY,BODY,SHOW_URL,PAYMETHOD,IT_B_PAY,DEFAULTBANK,NEED_CTU_CHECK,ROYALTY_TYPE,ROYALTY_PARAMETERS,ANTI_PHISHING_KEY,EXTER_INVOKE_IP,EXTRA_COMMON_PARAM ");
			strSql.Append(" FROM T_ALIPAYREQUEST ");
			strSql.Append(" where ALIPAYREQUESTID=:ALIPAYREQUESTID ");
			OracleParameter[] parameters = {
					new OracleParameter(":ALIPAYREQUESTID", OracleType.VarChar,50)};
			parameters[0].Value = ALIPAYREQUESTID;

			DataSet ds=DbHelperOra.Query(strSql.ToString(),parameters);
			if(ds.Tables[0].Rows.Count>0)
			{
				if(ds.Tables[0].Rows[0]["ALIPAYREQUESTID"]!=null && ds.Tables[0].Rows[0]["ALIPAYREQUESTID"].ToString()!="")
				{
					this.ALIPAYREQUESTID=ds.Tables[0].Rows[0]["ALIPAYREQUESTID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SERVICE"]!=null && ds.Tables[0].Rows[0]["SERVICE"].ToString()!="")
				{
					this.SERVICE=ds.Tables[0].Rows[0]["SERVICE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PARTNER"]!=null && ds.Tables[0].Rows[0]["PARTNER"].ToString()!="")
				{
					this.PARTNER=ds.Tables[0].Rows[0]["PARTNER"].ToString();
				}
				if(ds.Tables[0].Rows[0]["INPUT_CHARSET"]!=null && ds.Tables[0].Rows[0]["INPUT_CHARSET"].ToString()!="")
				{
					this.INPUT_CHARSET=ds.Tables[0].Rows[0]["INPUT_CHARSET"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SIGN_TYPE"]!=null && ds.Tables[0].Rows[0]["SIGN_TYPE"].ToString()!="")
				{
					this.SIGN_TYPE=ds.Tables[0].Rows[0]["SIGN_TYPE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SIGN"]!=null && ds.Tables[0].Rows[0]["SIGN"].ToString()!="")
				{
					this.SIGN=ds.Tables[0].Rows[0]["SIGN"].ToString();
				}
				if(ds.Tables[0].Rows[0]["NOTIFY_URL"]!=null && ds.Tables[0].Rows[0]["NOTIFY_URL"].ToString()!="")
				{
					this.NOTIFY_URL=ds.Tables[0].Rows[0]["NOTIFY_URL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["RETURN_URL"]!=null && ds.Tables[0].Rows[0]["RETURN_URL"].ToString()!="")
				{
					this.RETURN_URL=ds.Tables[0].Rows[0]["RETURN_URL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["ERROR_NOTIFY_URL"]!=null && ds.Tables[0].Rows[0]["ERROR_NOTIFY_URL"].ToString()!="")
				{
					this.ERROR_NOTIFY_URL=ds.Tables[0].Rows[0]["ERROR_NOTIFY_URL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["OUT_TRADE_NO"]!=null && ds.Tables[0].Rows[0]["OUT_TRADE_NO"].ToString()!="")
				{
					this.OUT_TRADE_NO=ds.Tables[0].Rows[0]["OUT_TRADE_NO"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SUBJECT"]!=null && ds.Tables[0].Rows[0]["SUBJECT"].ToString()!="")
				{
					this.SUBJECT=ds.Tables[0].Rows[0]["SUBJECT"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PAYMENT_TYPE"]!=null && ds.Tables[0].Rows[0]["PAYMENT_TYPE"].ToString()!="")
				{
					this.PAYMENT_TYPE=ds.Tables[0].Rows[0]["PAYMENT_TYPE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SELLER_EMAIL"]!=null && ds.Tables[0].Rows[0]["SELLER_EMAIL"].ToString()!="")
				{
					this.SELLER_EMAIL=ds.Tables[0].Rows[0]["SELLER_EMAIL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["BUYER_EMAIL"]!=null && ds.Tables[0].Rows[0]["BUYER_EMAIL"].ToString()!="")
				{
					this.BUYER_EMAIL=ds.Tables[0].Rows[0]["BUYER_EMAIL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SELLER_ID"]!=null && ds.Tables[0].Rows[0]["SELLER_ID"].ToString()!="")
				{
					this.SELLER_ID=ds.Tables[0].Rows[0]["SELLER_ID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["BUYER_ID"]!=null && ds.Tables[0].Rows[0]["BUYER_ID"].ToString()!="")
				{
					this.BUYER_ID=ds.Tables[0].Rows[0]["BUYER_ID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SELLER_ACCOUNT_NAME"]!=null && ds.Tables[0].Rows[0]["SELLER_ACCOUNT_NAME"].ToString()!="")
				{
					this.SELLER_ACCOUNT_NAME=ds.Tables[0].Rows[0]["SELLER_ACCOUNT_NAME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["BUYER_ACCOUNT_NAME"]!=null && ds.Tables[0].Rows[0]["BUYER_ACCOUNT_NAME"].ToString()!="")
				{
					this.BUYER_ACCOUNT_NAME=ds.Tables[0].Rows[0]["BUYER_ACCOUNT_NAME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PRICE"]!=null && ds.Tables[0].Rows[0]["PRICE"].ToString()!="")
				{
					this.PRICE=decimal.Parse(ds.Tables[0].Rows[0]["PRICE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["TOTAL_FEE"]!=null && ds.Tables[0].Rows[0]["TOTAL_FEE"].ToString()!="")
				{
					this.TOTAL_FEE=decimal.Parse(ds.Tables[0].Rows[0]["TOTAL_FEE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["QUANTIFY"]!=null && ds.Tables[0].Rows[0]["QUANTIFY"].ToString()!="")
				{
					this.QUANTIFY=decimal.Parse(ds.Tables[0].Rows[0]["QUANTIFY"].ToString());
				}
				if(ds.Tables[0].Rows[0]["BODY"]!=null && ds.Tables[0].Rows[0]["BODY"].ToString()!="")
				{
					this.BODY=ds.Tables[0].Rows[0]["BODY"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SHOW_URL"]!=null && ds.Tables[0].Rows[0]["SHOW_URL"].ToString()!="")
				{
					this.SHOW_URL=ds.Tables[0].Rows[0]["SHOW_URL"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PAYMETHOD"]!=null && ds.Tables[0].Rows[0]["PAYMETHOD"].ToString()!="")
				{
					this.PAYMETHOD=ds.Tables[0].Rows[0]["PAYMETHOD"].ToString();
				}
				if(ds.Tables[0].Rows[0]["IT_B_PAY"]!=null && ds.Tables[0].Rows[0]["IT_B_PAY"].ToString()!="")
				{
					this.IT_B_PAY=ds.Tables[0].Rows[0]["IT_B_PAY"].ToString();
				}
				if(ds.Tables[0].Rows[0]["DEFAULTBANK"]!=null && ds.Tables[0].Rows[0]["DEFAULTBANK"].ToString()!="")
				{
					this.DEFAULTBANK=ds.Tables[0].Rows[0]["DEFAULTBANK"].ToString();
				}
				if(ds.Tables[0].Rows[0]["NEED_CTU_CHECK"]!=null && ds.Tables[0].Rows[0]["NEED_CTU_CHECK"].ToString()!="")
				{
					this.NEED_CTU_CHECK=ds.Tables[0].Rows[0]["NEED_CTU_CHECK"].ToString();
				}
				if(ds.Tables[0].Rows[0]["ROYALTY_TYPE"]!=null && ds.Tables[0].Rows[0]["ROYALTY_TYPE"].ToString()!="")
				{
					this.ROYALTY_TYPE=ds.Tables[0].Rows[0]["ROYALTY_TYPE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["ROYALTY_PARAMETERS"]!=null && ds.Tables[0].Rows[0]["ROYALTY_PARAMETERS"].ToString()!="")
				{
					this.ROYALTY_PARAMETERS=ds.Tables[0].Rows[0]["ROYALTY_PARAMETERS"].ToString();
				}
				if(ds.Tables[0].Rows[0]["ANTI_PHISHING_KEY"]!=null && ds.Tables[0].Rows[0]["ANTI_PHISHING_KEY"].ToString()!="")
				{
					this.ANTI_PHISHING_KEY=ds.Tables[0].Rows[0]["ANTI_PHISHING_KEY"].ToString();
				}
				if(ds.Tables[0].Rows[0]["EXTER_INVOKE_IP"]!=null && ds.Tables[0].Rows[0]["EXTER_INVOKE_IP"].ToString()!="")
				{
					this.EXTER_INVOKE_IP=ds.Tables[0].Rows[0]["EXTER_INVOKE_IP"].ToString();
				}
				if(ds.Tables[0].Rows[0]["EXTRA_COMMON_PARAM"]!=null && ds.Tables[0].Rows[0]["EXTRA_COMMON_PARAM"].ToString()!="")
				{
					this.EXTRA_COMMON_PARAM=ds.Tables[0].Rows[0]["EXTRA_COMMON_PARAM"].ToString();
				}
			}
		}

		/// <summary>
		/// 获得数据列表
		/// </summary>
		public DataSet GetList(string strWhere)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select * ");
			strSql.Append(" FROM T_ALIPAYREQUEST ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			return DbHelperOra.Query(strSql.ToString());
		}

		#endregion  Method
	}
}

